package com.lgc.mine

import android.graphics.Color
import android.view.View
import androidx.databinding.ObservableField
import com.blankj.utilcode.util.ToastUtils
import com.lgc.common.base.BaseActivity
import com.lgc.mine.databinding.ActivityMineBinding
import com.lgc.mine.widget.ItemSettingBean

/**
 * mine模块
 */
class MineActivity :BaseActivity<ActivityMineBinding>() {
    override fun getLayoutRes(): Int =R.layout.activity_mine
    override fun initData() {
        super.initData()
        mBinding.apply {
            // todo
            val ib=ItemSettingBean(title="学习卡")
            val obean=ObservableField<ItemSettingBean>(ib)
            bean=obean
            ib.title="你的学习卡"
            ib.titleColor= Color.RED
            isvCard.setArrowRight{
                ToastUtils.showShort("点击了返回箭头")
            }
            ib.iconRes="URL"

//            isvCard.setInfo(bean)
//            isvCard.setArrowRight(object: View.OnClickListener{
//                override fun onClick(p0: View?) {
//                    finish()
//                   ToastUtils.showShort("点击了返回箭头")
//                }
//            })
            isvCard.setOnClickListener {
                ToastUtils.showShort("点击了整个item")
            }
        }
    }
}